
/**
 * 获取城市数据
 */
export const getAllCity = () => uni.$uv.http.post('base/system/queryAllCity', {}, { custom: { show: true } })
/**
 * 用户注册
 * @param {string} phoneNumber 手机号
 * @param {string} recommendCode 推荐码
 * @param {string} userPwd 密码
 * @param {string} smsCode 短信验证码
 */
export const userRegister = (params = {}) => uni.$uv.http.post('user/account/register', params, { custom: { show: true } })
/**
 * 用户登录
 * @param {string} phoneNumber 手机号
 * @param {string} password 密码
 */
export const userLogin = (params = {}) => uni.$uv.http.post('user/account/login', params, { custom: { show: true } })

/**
 * 获取首页banner数据
 * @param {string} location 广告位置 02：首页 03：钱包
 */
export const getBannerList = (params = {}) => uni.$uv.http.post('user/home/banner', params)

/**
 * 获取阿里oss上传图片token
 */
export const getOssToken = () => uni.$uv.http.post('oss/ststoken', {}, { custom: { show: true, mask: true } })
/**
 * 通过ocr获取图片中的文字信息
 * @param {string} fileUrl 网络图片地址
 * @param {string} frontOrBack 身份证必传 F：正面  B：反面
 * @param {string} apiType ORC类型 01：身份证 02：银行卡 03：营业执照
 */
export const getImageInfoByOcr = (params = {}) => uni.$uv.http.post('base/system/req', params, { custom: { show: true } })
/**
 * 获取系统参数
 *  @param {string} categoryCode PaymentChannel：机构渠道列表
 */
export const getSystemParams = (params = {}) => uni.$uv.http.post('base/system/queryEntry', params)


/**
 * 发送验证码校验手机号
 */
export const sendCaptchaCheckedPhone = (params = {}) => uni.$uv.http.post('user/account/checkUserPhone', params, { custom: { show: true, mask: true } })

/**
 * 发送验证码
 */
export const sendCaptcha = (params = {}) => uni.$uv.http.post('user/account/sendMsgValidator', params, { custom: { show: true, mask: true } })

/**
 * 找回登录密码
 */
export const resetPassword = (params = {}) => uni.$uv.http.post('user/account/retrievePwd', params, { custom: { show: true, mask: true } })


/**
 * 获取代理商信息
 */
export const getAgentInfo = (params = {}) => uni.$uv.http.post('agent/manage/agentInfo', params)
/**
 * 获取用户信息
 */
export const getUserInfo = () => uni.$uv.http.post('user/account/getUserInfo', {})

/**
 * 切换机构渠道
 */
export const changeChannelType = (params = {}) => uni.$uv.http.post('user/account/setPaymentChannel', params, { custom: { show: true, mask: true } })

/**
 * 获取首页统计数据
 */
export const getStatisticsData = () => uni.$uv.http.post('user/home/homeAmountQuery', {})

/**
 * 退出登录
 */
export const userLogout = () => uni.$uv.http.post('user/account/logOut', {}, { custom: { show: true, mask: true } })

/**
 * 获取消息列表
 */
export const getMessageList = (params = {}, page) => uni.$uv.http.post('user/home/message', params, {
	custom: { page }
})
/**
 * 修改密码
 */
export const updatePassword = (params) => uni.$uv.http.post('user/account/modifyPwd', params , { custom: { show: true, mask: true } })
/**
 * 修改支付密码
 */
export const updatePayPassword = (params) => uni.$uv.http.post('user/account/modifyWithdrawPwd', params , { custom: { show: true, mask: true } })
/**
 * 设置支付密码
 */
export const setPayPassword = (params) => uni.$uv.http.post('user/account/assignWithdrawPwd', params , { custom: { show: true, mask: true } })

/**
 * 设置是否支持多人登录开关状态
 */
export const setMultiLoginStatus = (params) => uni.$uv.http.post('user/account/accountManySet', params , { custom: { show: true, mask: true } })

/**
 * 获取钱包账户信息
 */
export const getWalletsInfo = () => uni.$uv.http.post('agent/wallet/wallets', {} )

/**
 * 获取我的货款账户信息
 */
export const getBillInfo = () => uni.$uv.http.post('agent/wallet/bill/myBill', {} )

/**
 * 提交账号注销
 */
export const accountDelete = (params) => uni.$uv.http.post('user/account/cancel', params ,{ custom: { show: true, mask: true } })

/**
 * 获取结算卡列表
 */
export const getSettleList = () => uni.$uv.http.post('agent/merchant/debitCardQuery', {} )

/**
 * 获取提现规则
 */
export const getWalletRule = (params) => uni.$uv.http.post('agent/wallet/queryRule', params ,{ custom: { show: true, mask: true } })

/**
 * 创建提现订单
 */
export const createWithdrawOrder = (params) => uni.$uv.http.post('agent/wallet/withdrawPre', params ,{ custom: { show: true, mask: true } })

/**
 * 提交提现
 */
export const submitWithdrawOrder = (params) => uni.$uv.http.post('agent/wallet/withdraw', params ,{ custom: { show: true, mask: true } })

/**
 * 获取提现记录列表
 */
export const getWithdrawalRecordList = (page) => uni.$uv.http.post('agent/wallet/withdrawRecord', {}, {
	custom: { page }
})
/**
 * 获取我的账单
 */
export const getMyBill = () => uni.$uv.http.post('agent/wallet/bill/myBill',{})
/**
 * 获取货款账单数据
 */
export const getGoodsBillAmount = (params = {}) => uni.$uv.http.post('agent/wallet/bill/queryGoodsBillAmount',params)

/**
 * 获取货款账单列表数据
 */
export const getGoodsBillAmountList = (params = {},page) => uni.$uv.http.post('agent/wallet/bill/queryGoodsBillList',params,{custom:{page}})
/**
 * 获取货款账单详情数据
 */
export const getGoodsBillDetail = (params = {}) => uni.$uv.http.post('agent/wallet/bill/queryGoodsBillDetail',params)

/**
 * 获取货款/考核抵扣明细列表
 */
export const getGoodsBillDetailList = (params = {},page) => uni.$uv.http.post('agent/wallet/agentTxnLog',params,{custom:{page}})

/**
 * 获取考核账单数据
 */
export const getAssessBillAmount = (params = {}) => uni.$uv.http.post('agent/wallet/bill/queryAssessBillAmount',params)

/**
 * 获取考核账单列表数据
 */
export const getAssessBillAmountList = (params = {},page) => uni.$uv.http.post('agent/wallet/bill/queryAssessBillList',params,{custom:{page}})



/**
 * 获取待结考核代理商列表数据
 */
export const getAgentAssessBillPaymentList = (params = {},page) => uni.$uv.http.post('agent/wallet/bill/queryAgentAssessBillPaymentList',params,{custom:{page}})

/**
 * 获取待收考核代理商列表数据
 */
export const getAgentGoodsBillPaymentList = (params = {},page) => uni.$uv.http.post('agent/wallet/bill/queryAgentGoodsBillPaymentList',params,{custom:{page}})


/**
 * 获取收益汇总数据
 */
export const getIncomeStatisticsData = (params = {}) => uni.$uv.http.post('agent/wallet/revenueRecordCollect',params)

/**
 * 获取收益汇总列表数据
 */
export const getIncomeStatisticsListData = (params = {},page) => uni.$uv.http.post('agent/wallet/revenueRecord',params,{custom:{page}})
/**
 * 获取代理商收益类型筛选数据
 */
export const getAgentPolicyProfitType = (params = {}) => uni.$uv.http.post('agent/policy/queryPolicyProfitType',params)
/**
 * 获取代理商政策筛选数据
 */
export const getAgentPolicy = (params = {}) => uni.$uv.http.post('agent/policy/queryPolicy',params)
/**
 * 获取收益汇总明细列表
 */
export const getIncomeStatisticsDetailList = (params = {}) => uni.$uv.http.post('agent/wallet/selectAgentProfit',params)

/**
 * 获取银行列表
 */
export const getBankList = () => uni.$uv.http.post('base/system/queryBankBranch',{},{custom:{show: true, mask: true}})

/**
 * 获取支行列表
 */
export const getSubBankList = (params,page) => uni.$uv.http.post('base/system/queryBankInfo',params,{custom:{page,show: true, mask: true}})

/**
 * 提交绑定银行卡
 */
export const bindBankCard = (params) => uni.$uv.http.post('agent/merchant/bindDebitCard',params,{custom:{show: true, mask: true}})

/**
 * 校验银行卡是否是借记卡
 */
export const checkedDebitCard = (params) => uni.$uv.http.post('base/system/queryCardInfo',params,{custom:{show: true, mask: true}})

/**
 * 新增代理商
 */
export const addAgent = (params) => uni.$uv.http.post('agent/manage/addAgent',params,{custom:{show: true, mask: true}})


/**
 * 新增代理商认证短信验证
 */
export const checkedAddAgentSms = (params) => uni.$uv.http.post('agent/manage/checkAddSms',params,{custom:{show: true, mask: true}})

/**
 * 代理商认证
 */
export const agentAuth = (params) => uni.$uv.http.post('agent/manage/agentAuth',params,{custom:{show: true, mask: true}})

/**
 * 获取运营交易数据
 */
export const getTradeData = () => uni.$uv.http.post('user/home/transactionAmount',{})

/**
 * 获取运营交易统计数据
 */
export const getTradeChartData = (params) => uni.$uv.http.post('user/home/transactionTotalList',params)


/**
 * 获取运营收益数据
 */
export const getIncomeData = () => uni.$uv.http.post('user/home/incomeAmount',{})

/**
 * 获取运营收益统计数据
 */
export const getIncomeChartData = (params) => uni.$uv.http.post('user/home/incomeTotalList',params)

/**
 * 获取运营机具数据
 */
export const getOperateDeviceData = (params = {}) => uni.$uv.http.post('agent/report/device',params)

/**
 * 获取筛选政策列表
 */
export const getFilterPolicyList = (params = {}) => uni.$uv.http.post('agent/report/policyTJ',params)

/**
 * 获取指定政策下的交易数据
 */
export const getPolicyTrade= (params) => uni.$uv.http.post('agent/report/policyTrans',params)
/**
 * 获取政策报表数据
 */
export const getPolicyReport = (params) => uni.$uv.http.post('agent/report/policy',params)

/**
 * 获取代理商列表
 */
export const getAgentList = (params,page) => uni.$uv.http.post('agent/manage/agentList',params,{custom:{page,show:true}})

/**
 * 获取交易订单列表
 */
export const getTradeOrderList = (params,page) => uni.$uv.http.post('agent/merchant/transactionList',params,{custom:{page,show:true}})
/**
 * 获取流量卡订单列表
 */
export const getFlowCardOrderList = (params,page) => uni.$uv.http.post('agent/order/queryAgentOrderSimFeeList',params,{custom:{page,show:true}})
/**
 * 获取服务费订单列表
 */
export const getServiceOrderList = (params,page) => uni.$uv.http.post('agent/order/queryAgentDepositList',params,{custom:{page,show:true}})

/**
 * 获取交易订单月统计金额
 */
export const getTradeOrderMonthStatistics = (params) => uni.$uv.http.post('agent/merchant/transactionCollect',params)
/**
 * 获取流量卡月统计金额
 */
export const getFlowCardOrderMonthStatistics = (params) => uni.$uv.http.post('agent/order/queryAgentOrderSimFeeCount',params)
/**
 * 获取服务费日统计金额
 */
export const getServiceOrderDayStatistics = (params) => uni.$uv.http.post('agent/order/queryAgentDepositCount',params)

/**
 * 获取排行榜列表
 */
export const getRankingList = (params,page) => uni.$uv.http.post('agent/rank/queryList',params,{custom:{page,show:true}})
/**
 * 获取未/伪激活机具列表
 */
export const getAbnormalDeviceList = (params,page) => uni.$uv.http.post('agent/device/queryAbnormalDeviceList',params,{custom:{page,show:true}})

/**
 * 获取代理商管理首页数据
 */
export const getAgentManagerStatistics = () => uni.$uv.http.post('agent/manage/agentNumber',{})

/**
 * 获取异常代理商数据
 */
export const getAbnormalAgentList = () => uni.$uv.http.post('agent/label/querySubAgentLabel',{},{custom:{show:true}})

/**
 * 获取未认证代理商列表
 */
export const getNoAuthAgentList = (params,page) => uni.$uv.http.post('agent/manage/agentNoVerityList',params,{custom:{page,show:true}})

/**
 * 获取货款调拨明细
 */
export const getBillAllotList = (params) => uni.$uv.http.post('agent/device/queryBillAllotList',params,{custom:{show:true}})

/**
 * 创建货款订单
 */
export const createPaymentBillOrder = (params) => uni.$uv.http.post('agent/device/createPaymentBill',params,{custom:{show:true}})

/**
 * 核销货款
 */
export const verifyingPaymentBill = (params) => uni.$uv.http.post('agent/device/verifyingPaymentBill',params,{custom:{show:true}})

/**
 * 获取抵扣规则数据
 */
export const getBillDeductRule = (params) => uni.$uv.http.post('agent/device/queryBillDeductRule',params,{custom:{show:true}})

/**
 * 配置抵扣规则
 */
export const updateBillDeductRule = (params) => uni.$uv.http.post('agent/device/modifyBillDeductRule',params,{custom:{show:true}})

/**
 * 获取机具首页统计数据
 */
export const getDeviceNumStatistics = () => uni.$uv.http.post('agent/device/queryDeviceNum',{})

/**
 * 获取机具列表
 */
export const getDeviceList = (params,page) => uni.$uv.http.post('agent/device/queryDeviceList',params,{custom:{page,show:true}})

/**
 * 机具申请解绑
 */
export const applyUnBindDevice = (params) => uni.$uv.http.post('agent/device/applyDeviceUnbind',params,{custom:{show:true}})

/**
 * 获取机具详情产品政策数据
 */
export const getDeviceDetailByPolicy = (params) => uni.$uv.http.post('agent/device/queryDeviceDetail',params)

/**
 * 获取机具详情服务费数据
 */
export const getDeviceDetailByService = (params) => uni.$uv.http.post('agent/device/queryDeviceDepositFee',params)

/**
 * 获取机具详情服务费模版列表
 */
export const getDeviceDetailTemplateList = (params) => uni.$uv.http.post('agent/device/queryDeviceDepositTemplate',params)
/**
 * 修改服务费模版
 */
export const updateServiceTemplate = (params) => uni.$uv.http.post('agent/device/editDeviceDepositFee',params,{custom:{show:true}})
/**
 * 获取商户费率
 */
export const getMerchantRate = (params) => uni.$uv.http.post('agent/merchant/rateQuery',params,{custom:{show:true}})

/**
 * 设置商户费率
 */
export const setMerchantRate = (params) => uni.$uv.http.post('agent/merchant/setRate',params,{custom:{show:true}})

/**
 * 修改商户费率
 */
export const updateMerchantRate = (params) => uni.$uv.http.post('agent/merchant/modifyRate',params,{custom:{show:true}})

/**
 * 获取政策列表
 */
export const getAgentPolicyList = (params,page) => uni.$uv.http.post('agent/policy/queryPolicy',params,{custom:{show:true,page}})
/**
 * 获取代理商政策费率
 */
export const getAgentPolicyRate = (params) => uni.$uv.http.post('agent/policy/getAgentRate',params,{custom:{show:true}})

/**
 * 代理商政策绑定
 */
export const bindAgentPolicy = (params) => uni.$uv.http.post('agent/manage/openAgentPolicy',params,{custom:{show:true}})

/**
 * 修改代理商政策费率
 */
export const updateAgentPolicyRate = (params) => uni.$uv.http.post('agent/policy/modifyAgentRate',params,{custom:{show:true}})

/**
 * 获取代理商政策活动列表
 */
export const getAgentActivityList = (params) => uni.$uv.http.post('agent/policy/queryActivity',params,{custom:{show:true}})

/**
 * 修改代理商活动
 */
export const updateAgentActivity = (params) => uni.$uv.http.post('agent/policy/modifyActive',params,{custom:{show:true}})

/**
 * 获取考核政策列表
 */
export const getAssessmentList = (params) => uni.$uv.http.post('agent/policy/queryAssessment',params,{custom:{show:true}})

/**
 * 获取调拨明细列表
 */
export const getTransferList = (params,page) => uni.$uv.http.post('agent/device/transferList',params,{custom:{show:true,page}})

/**
 * 获取调拨明细详情
 */
export const getTransferListDetail = (params) => uni.$uv.http.post('agent/device/transferDevDetail',params,{custom:{show:true}})

/**
 * 获取接收明细列表
 */
export const getRecvTransferList = (params,page) => uni.$uv.http.post('agent/device/recvTransferList',params,{custom:{show:true,page}})

/**
 * 获取接收明细详情
 */
export const getRecvTransferListDetail = (params) => uni.$uv.http.post('agent/device/transferDevDetail',params,{custom:{show:true}})

/**
 * 获取可划拨/回拨机具列表
 */
export const getCanTransferDevList = (params) => uni.$uv.http.post('agent/device/queryCanTransferDevList',params,{custom:{show:true}})

/**
 * 机具划拨
 */
export const deviceTransfer  = (params) => uni.$uv.http.post('agent/device/deviceTransfer',params,{custom:{show:true}})

/**
 * 机具回拨
 */
export const deviceCallback  = (params) => uni.$uv.http.post('agent/device/deviceCallback',params,{custom:{show:true}})

/**
 * 获取商户统计数据
 */
export const getMerchantStatistics  = () => uni.$uv.http.post('agent/merchant/merchantNumber',{})
/**
 * 获取异常商户分组列表
 */
export const getMerSilenceList  = () => uni.$uv.http.post('agent/merchant/queryMerSilenceList',{},{custom:{show:true}})
/**
 * 获取异常商户列表
 */
export const getMerSilenceDetailList  = (params,page) => uni.$uv.http.post('agent/merchant/queryMerSilenceDetailList',params,{custom:{show:true,page}})

/**
 * 获取商户列表
 */
export const getMerchantList  = (params,page) => uni.$uv.http.post('agent/merchant/merchantList',params,{custom:{show:true,page}})

/**
 * 获取远程注册机具绑定商户列表
 */
export const getRemoteRegisterMerchantList  = (params,page) => uni.$uv.http.post('agent/merchant/queryRemoteMercList',params,{custom:{show:true,page}})

/**
 * 远程注册商户机具绑定
 */
export const remoteRegisterMerchantBindDevice  = (params) => uni.$uv.http.post('agent/merchant/bindRemoteMerc',params,{custom:{show:true}})

/**
 * 获取开票认证信息
 */
export const getInvoiceAuthInfo  = () => uni.$uv.http.post('agent/wallet/invoiceAuthQuery',{})

/**
 * 开票认证
 */
export const invoiceAuth = (params) => uni.$uv.http.post('agent/wallet/invoiceAuth',params,{custom:{show:true}})

/**
 * 获取开票信息
 */
export const getInvoiceInfo = () => uni.$uv.http.post('agent/wallet/invoiceInfoQuery',{},{custom:{show:true}})

/**
 * 获取开票记录
 */
export const getInvoiceOrderList  = (params,page) => uni.$uv.http.post('agent/wallet/invoiceRecord',params,{custom:{show:true,page}})

/**
 * 创建开票订单
 */
export const creayeInvoiceOrder = (params) => uni.$uv.http.post('agent/wallet/addAgentInvoice',params,{custom:{show:true}})

/**
 * 获取店铺升级商户列表
 */
export const getStoreUpgradeList  = (params,page) => uni.$uv.http.post('agent/merchant/selectMercRaiseInfoList',params,{custom:{show:true,page}})

/**
 * 提交店铺升级
 */
export const storeUpgrade  = (params) => uni.$uv.http.post('agent/merchant/MercRaiseUp',params,{custom:{show:true}})

/**
 * 通过营业执照号获取企业信息
 */
export const getCompanyInfo  = (params) => uni.$uv.http.post('agent/merchant/submitCompany',params,{custom:{show:true}})

/**
 * 获取店铺升级信息
 */
export const getStoreUpgradeInfo  = (params) => uni.$uv.http.post('agent/merchant/selectMercRaiseInfo',params,{custom:{show:true}})

/**
 * 版本更新
 */
export const checkUpdateVersion  = (params) => uni.$uv.http.post('user/home/updateVersion',params)

